package Computer.Event;
import Computer.Main.*;

public class Copy implements Instruction {
	private Pointer ptr;
	private Address addr;
	
	public Copy(Pointer ptr, Address addr) {
		this.ptr = ptr;
		this.addr = addr;
	}
	
	@Override
	public void execute(Memory memory, ProgramCounter counter) {
		addr.getWord(memory).cpy(ptr.getWord(memory));
		counter.increment();
	}
	
	public String toString() {
		return "CPY " + ptr + " " + addr;
	}

}
